import React from "react";
import PropTypes from "prop-types";
import ListCardItem from "./item";

/**
 * 列表项
 * eg: 考核成绩展示列表
 * jiansong 2019/11/8
 */

/**
 * @param data 数据数组
 * 格式：[{label:"名称",value:"值"}]
 */
const WrListCard = ({data = []}) => (
    <div>
        {data.map((item, index) => <ListCardItem key={index} label={item.label} value={item.value}/>)}
    </div>
)

WrListCard.propTypes = {
    data: PropTypes.array,
}
export default WrListCard;